<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>公司转账</title>
  <meta name="Anthor" content="月影-253737688" />
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no"/>
	<link rel="stylesheet" href="./css/transfer.css">
</head>
<body>
<div class="transfer_info">
    <div class="transfer_title">  点击图标即可复制：</div>
    <ul  class="transfer_list">
        <li>
            <div class="list_num"></div>
            <div class="list_text">
                <p class="list_info"><span>收款户名：</span><span class="copy_text">上海网络科技</span> </p>
                <p class="copy_btn"></p>
            </div>
        </li>
        <li> <div class="list_num"></div>
            <div class="list_text">
                <p class="list_info"><span>收款账号：</span><span class="copy_text">10011*******86</span> </p>
                <p class="copy_btn"></p>
            </div>
        </li>
        <li> <div class="list_num"></div>
            <div class="list_text">
                <p class="list_info"><span>收款银行：</span><span class="copy_text">中国工商银行</span></p>
                <p class="copy_btn"></p>
            </div>
        </li>

    </ul>
</div>
 
 

<div class="copy_tips">
    <div class="copy_success">复制成功</div>
</div>

<script src="js/jquery.min.js"></script>
<script>

    $(function () {
       $('.copy_btn').on('click',function () {
           let text = $(this).siblings('.list_info').find('.copy_text').text();
           let oInput = document.createElement('input');
           oInput.value = text;
           document.body.appendChild(oInput);
           oInput.select(); // 选择对象
           document.execCommand("Copy"); // 执行浏览器复制命令
           oInput.className = 'oInput';
           oInput.style.display='none';
           $('.copy_tips').fadeIn().fadeOut()
       })

    })

</script>

</body>
</html>